package com.quwan.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author quan
 * @date 2021-12-10 10:59
 */
@Getter
@AllArgsConstructor
public enum RedisListenerEnum {
    cancel_coupon_order("app:cancelOrder:expireCoupon", "redisKeyEventListener", "cancelTimeOutCouponOrder", "取消未支付订单优惠信息"),
    cancel_not_process_order("app:cancelOrder:notProcess", "redisKeyEventListener", "cancelNotProcessOrder", "取消超时未接单订单"),
//    auto_confirm_order("app:auto:confirmOrder", "redisKeyEventListener", "autoConfirmOrder", "超时自动确认订单"),
    auto_access_count("app:auto:accessCount", "redisKeyEventListener", "autoAccessCount", "访问量统计");
  //  auto_push_msg("app:auto:pushMsg", "redisKeyEventListener", "autoPushMsg", "首次注册自动推送消息");
    String key;
    String component;
    String method;
    String tips;
    public static final String split = "@@";

    public static RedisListenerEnum getByKey(String key) {
        for (RedisListenerEnum value : values()) {
            if (value.getKey().equals(key)) {
                return value;
            }
        }
        return null;
    }

}
